<template>
  <ApiSelect v-bind="{ ...config, ...$attrs }"></ApiSelect>
</template>

<script lang="ts" setup>
  import { ref } from 'vue';
  import { apiGetEquipmentPage } from '@/api/equipment';
  import ApiSelect from '../ApiSelect/index.vue';

  // 选择特定渠道
  const config = ref({
    placeholder: '请选择',
    remoteApi: () => {
      return apiGetEquipmentPage({
        page_num: 1,
        page_size: 999,
      }).then((res) => {
        return res.data.rows;
      });
    },
    changeImmediate: false,
    valueField: 'device_id',
    labelField: 'car_device_no',
  });
</script>
